package com.ykht.proj.activity.Enum;

/**
 * 协议状态枚举类
 */
public enum AgreementStatusEnum {
	//协议状态  0 进行中  1 待开始  2 暂停中  3 已过期
	AT_WORK(0,"进行中"),
	TO_START(1,"待开始"),
	SUSPEND(2,"暂停中"),
	BE_OVERDUE(3,"已取消");

	private Integer value;
	private String desc;

	private AgreementStatusEnum(Integer value, String desc) {
		this.value = value;
		this.desc = desc;
	}


	/**
	 * 根据val值获取desc
	 * @param val 1、0
	 * @return
	 */
	public static String getDescByVal(Integer val) {
		AgreementStatusEnum[] values = AgreementStatusEnum.values();
		for (AgreementStatusEnum oe : values) {
			if (oe.getValue().equals(val)) {
				return oe.getDesc();
			}
		}
		return null;
	}

	public Integer getValue() {
		return value;
	}

	public void setValue(Integer value) {
		this.value = value;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}
}
